package reseau;

import java.util.ArrayList;

public class WayPoint
{
	protected int numero;
	
	protected Coordonnees2D position;
	protected ArrayList<WayPoint> voisins;
	
	public WayPoint(int numero, Coordonnees2D position)
	{ 
		this.numero = numero;
		this.position = position;
		this.voisins = new ArrayList<WayPoint>();
	}
	
	public int getNumero()
	{ return this.numero; }
	
	public Coordonnees2D getPosition()
	{ return this.position; }
	
	public void ajouterVoisin(WayPoint voisin) 
	{ this.voisins.add(voisin);	}

	public int getNombreVoisins() 
	{ return this.voisins.size(); }

	public WayPoint getVoisin(int index) 
	{ return this.voisins.get(index); }
}
